<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>美嘉饲料</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<meta http-equiv="Expires" CONTENT="-1">
<meta http-equiv="Cache-Control" CONTENT="no-cache">
<meta http-equiv="Pragma" CONTENT="no-cache">
<link rel="stylesheet" href="/m/css/style.css">
<link href="<%=basePath%>skin/css/validform/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=basePath%>skin/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="<%=basePath%>skin/js/validform/Validform_v5.3.2_min.js"></script>
<script type="text/javascript" src="<%=basePath%>skin/js/jquery.lSelect.js"></script>
<script type="text/javascript" src="<%=basePath%>m/js/common.js"></script>
<script language="javascript">
	 $().ready(function() {
		// 地区选择
		$("#areaId").lSelect({
			url: "<%=basePath%>area.shtml"
		});
		
		 //验证
		 var validform = $("#form1").Validform({
			btnSubmit:"#save",
			tiptype:1
		 });
		 validform.addRule([
			{
			    ele:"#consignee",
			    datatype:"*",
			    nullmsg:"请输入收货人！"
			},
			{
			    ele:"#address",
			    datatype:"*",
			    nullmsg:"请输入地址！"
			},
			{
			    ele:"#zipCode",
			    datatype:"p",
			    nullmsg:"请输入邮编！"
			},
			{
			    ele:"#phone",
			    datatype:"*",
			    nullmsg:"请输入联系电话！"
			}
		 ]);
	 });
</script>
</head>
<body>
	<c:import url="/m/layouts/top.jsp" />
	<a name="top"></a>
	<!--header-->
	<header>
		<div class="header">
			<a href="/m/member/receiver/list.shtml" class="header-a-back"><span>返回</span></a>
			<a href="/m/index.html" class="header-a-home"><span>首页</span></a>
			<h2>添加收货地址</h2>
		</div>
	</header>
	<div class="clear"></div>
	<form id="form1" name="form1" method="post" action="<%=basePath%>m/member/receiver/save.shtml">
		<div class="addr-div">
			<dl>
				<dd>
					<span class="form_hd">收货人：</span><span class="form_td"><input
						name="consignee" id="consignee" type="text" maxlength="50"
						class="text_input" autofocus></span>
				</dd>
				<dd>
					<span class="form_hd">地区：</span><span class="form_td">
					<input type="hidden" id="areaId" name="areaId" />
					</span>
				</dd>
				<dd>
					<span class="form_hd">地址：</span><span class="form_td"><input
						name="address" id="address" type="text" maxlength="50"
						class="text_input"></span>
				</dd>
				<dd>
					<span class="form_hd">邮编：</span><span class="form_td"><input
						name="zipCode" id="zipCode" type="text" maxlength="50"
						class="text_input"></span>
				</dd>
				<dd>
					<span class="form_hd">联系电话：</span><span class="form_td"><input
						name="phone" id="phone" type="text" maxlength="50"
						class="text_input"></span>
				</dd>
				<dd>
					<span class="form_hd">是否默认：</span><span class="form_td"><input type="checkbox" id="isDefault" name="isDefault" value="true"/></span>
				</dd>
			</dl>
		</div>
		<div class="ui-btn-area">
			<input type="button" name="button" class="btn_red" value="完成" id="save"/>
		</div>
	</form>
	<c:import url="/m/layouts/foot.jsp" />
</body>
</html>
